﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace NMT_WEB.UserControls
{
    /// <remarks>
    /// Autor:  César Murcia
    /// email:  cmurcia@gmail.com
    /// </remarks>
    /// <remarks>
    /// Fecha:  17-11-2011
    /// </remarks>
    /// <summary>
    /// Contiene el Menú.
    /// </summary>
    public partial class Menu : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.CreateMenu();
            }
        }

        ///<summary>
        /// Crea los diferentes ítems del menú.
        ///</summary>
        ///<returns></returns>
        private void CreateMenu()
        {
            int index;

            try
            {
                index = 0;

                //-----------------------------------------------------------------
                // Crear el menú
                //-----------------------------------------------------------------

                //-----------------------------------------------------------------
                // Menú para Inicio
                //-----------------------------------------------------------------
                skmMenu.MenuItem menu0 = new skmMenu.MenuItem("&nbsp;&nbsp;Inicio&nbsp;&nbsp;", "Index.aspx", "", "menuinicio");
                this.Options.Items.Insert(index, menu0);
                index++;
                //-----------------------------------------------------------------

                //-----------------------------------------------------------------
                // Menús
                //-----------------------------------------------------------------
                skmMenu.MenuItem menu1 = new skmMenu.MenuItem("&nbsp;&nbsp;&nbsp;Administración&nbsp;&nbsp;&nbsp;", "Administracion.aspx", "", "menuitem", "mouseover", "mousedown", "mouseup");
                this.Options.Items.Insert(index, menu1);
                index++;
                skmMenu.MenuItem menu2 = new skmMenu.MenuItem("&nbsp;&nbsp;&nbsp;Reportes&nbsp;&nbsp;&nbsp;", "Reporte.aspx", "", "menuitem", "mouseover", "mousedown", "mouseup");
                this.Options.Items.Insert(index, menu2);
                index++;
                //-----------------------------------------------------------------

                //-----------------------------------------------------------------
                // Menú para Salir
                //-----------------------------------------------------------------
                //skmMenu.MenuItem menu6 = new skmMenu.MenuItem("&nbsp;&nbsp;Salir&nbsp;&nbsp;", "Exit.aspx", "", "menusalir");
                //this.Options.Items.Insert(index, menu6);
                //-----------------------------------------------------------------

            }
            catch (Exception e)
            {
                Console.Write(e);
            }
        }
    }
}